/* ----------------------------------------------------------------------
*
* Copyright (C) 2025 XiaoFei. All rights reserved.
*
* $file:		XiaoFei_ADC1.h
* $Date:        26-January-2025
* $Revision: 	V1
* $Project: 	XiaoFei BSP Library
*
* -------------------------------------------------------------------- */

#ifndef __XiaoFei_ADC1_H
#define __XiaoFei_ADC1_H

/* 
* @function: 	ADC1_Init
* @parameter:	[out] ADC1_Pin				 The PA(ADC1_Pin) will use ADC1 to get value.
*/
void ADC1_Init(unsigned int ADC1_Pin);

/* 
* @function: 	ADC1_GetValue
* @parameter:	[out] ADC_Channel			 The PA(ADC_Channel) will use ADC1 to get value.
* @return:		The ADC1 value from PA(ADC_Channel). This value will be mapped from 0 to 3.3 volts to 0 to 4096.
*/
unsigned int ADC1_GetValue(unsigned char ADC_Channel);

/* 
* @function: 	ADC1_GetVoltage
* @parameter:	[out] ADC_Channel			 The PA(ADC_Channel) will use ADC1 to get value.
* @return:		The Voltage value from PA(ADC_Channel). This value need to be limited to 0 to 3.3 volts..
*/
float ADC1_GetVoltage(unsigned char ADC_Channel);

#endif

